import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getCompiledServerMdx } from "@mintlify/mdx";
import { compileMDX } from "next-mdx-remote/rsc";
export default async function Home() {
    const fileContentResponse = await fetch("https://raw.githubusercontent.com/mintlify/starter/main/essentials/code.mdx");
    const fileContentData = await fileContentResponse.text();
    const { content, frontmatter } = await getCompiledServerMdx({
        source: `---
      title: RSC Frontmatter Example
      ---
      # Hello World
      This is from Server Components!
    `,
    });
    const { content, frontmatter } = await compileMDX({
        source: `---
      title: RSC Frontmatter Example
      ---
      # Hello World
      This is from Server Components!
    `,
        options: { parseFrontmatter: true },
    });
    console.log(frontmatter);
    return (_jsxs("article", { className: "prose mx-auto py-8", children: [_jsx("h1", { children: String(frontmatter.title) }), content] }));
}
